package com.clock.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Api(tags = "帖子详情")
@ApiModel
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Data
public class InsertDiscussPostDTO {

    @ApiModelProperty(value = "帖子id", required = true)
    private Long postId;

    @ApiModelProperty(value = "用户id", required = true)
    private Long userId;

    @ApiModelProperty(value = "帖子题目", required = true)
    private String title;

    @ApiModelProperty(value = "帖子内容", required = true)
    private String content;

    @ApiModelProperty(value = "标签id组", required = true)
    private Integer[] tags;

    @ApiModelProperty(value = "0-普通;1-置顶", required = true)
    private Integer type;

    @ApiModelProperty(value = "0-正常;1-精华;2-拉黑;", required = true)
    private Integer status;

    @ApiModelProperty(value = "创建时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    @ApiModelProperty(value = "评论数")
    private Long commentCount;

    @ApiModelProperty(value = "分数")
    private Double score;


}
